import 'package:flutter/material.dart';
import 'package:we_slide/we_slide.dart';
import 'logic.dart';
import 'package:get/get.dart';

class DrawerPage extends StatelessWidget {
  final logic = Get.put(DrawerLogic());
  final state = Get.find<DrawerLogic>().state;

  @override
  Widget build(BuildContext context) {
    final _colorScheme = Theme.of(context).colorScheme;
    final double _panelMinSize = 70.0;
    final double _panelMaxSize = MediaQuery.of(context).size.height / 2;

    return Scaffold(
      body: WeSlide(
        panelMinSize: _panelMinSize,
        panelMaxSize: _panelMaxSize,
        body: Container(
          color: _colorScheme.background,
          child: Center(child: Text("主体内容")),
        ),
        panel: Container(
          color: _colorScheme.primary,
          child: Center(child: Text("抽屉内容")),
        ),
        hidePanelHeader: true,
        panelHeader: Container(
          height: _panelMinSize,
          color: _colorScheme.secondary,
          child: Center(child: Text("抽屉触摸点")),
        ),
        parallax: false,//抽屉打开时主页大小不变
        transformScale: false,//抽屉变大 主页变小
        overlay: true,
        blur: false,//主页蒙层
        isDismissible: true,

      ),
    );
  }


}
